// Project: Salient
// http://salient.codeplex.com
// 
// Copyright 2010, Sky Sanders <sky at skysanders.net>
// Dual licensed under the MIT or GPL Version 2 licenses.
// http://salient.codeplex.com/license
// 
// Date: April 25 2010 

#region

using System.Configuration;
using System.Web.Configuration;

#endregion

namespace Salient.Web.Configuration
{
    
    ///<summary>
    ///</summary>
    public class SalientSectionGroup : ConfigurationSectionGroup
    {
        private const string SectionGroupKey = "salient.web";
        private const string AccessControlKey = "accessControl";
        private const string SessionAuditorKey = "sessionAuditor";

        ///<summary>
        ///</summary>
        public static SalientSectionGroup Instance
        {
            get
            {
                SalientSectionGroup instance = (SalientSectionGroup) WebConfigurationManager.OpenWebConfiguration("/").GetSectionGroup(SectionGroupKey);
                return instance;
            }   
        }

        ///<summary>
        ///</summary>
        [ConfigurationProperty(AccessControlKey)]
        public AccessControlSection AccessControl
        {
            get { return (AccessControlSection)Sections[AccessControlKey]; }
        }

        ///<summary>
        ///</summary>
        [ConfigurationProperty(SessionAuditorKey)]
        public SessionAuditorSection SessionAuditor
        {
            get { return (SessionAuditorSection)Sections[SessionAuditorKey]; }
        }
        
    }
}